<?php
//error_reporting(E_ALL|E_STRICT); //thong so xen loi 

set_time_limit(300);
// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
	
/* Define base path obtainable throughout the whole application */
defined('BASE_PATH')
	|| define('BASE_PATH', realpath(dirname(__FILE__)));
/*difine dung dan tuong doi thu muc */
 define('PATH_TD','/email/trunk/public');
 define("URL_SITE", "http://localhost");
 define('BASE_URL', "http://".$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'],0,strpos ($_SERVER['PHP_SELF'],'/',1))); 
 
    
// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
//echo APPLICATION_ENV;die;
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));
//start config autu loader paven
	require_once 'Zend/Loader/Autoloader.php'; 
	Zend_Loader_Autoloader::getInstance();
//end config autoloader
//Set chaset utf8 
//Zend_Search_Lucene_Analysis_Analyzer::setDefault(
//new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8());
/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
            ->run();